package org.example.ioc.pro6_ioc_scope;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
//@Scope(value = "singleton")   //单例模式，默认值   加载时机：容器创建时 非懒加载
@Scope(value = "prototype")   //多例模式   加载时机：容器创建时  懒加载  getBean时创建对象
public class Product {
    public Product() {
        System.out.println("Product 构造器");
    }
}
